/**
 * 更改预订
 * @email 626097912@qq.com
 * Created by dength on 2017/05/16
 */
import React, { Component } from 'react';
import {
    AppRegistry,
    StyleSheet,
    Text,
    View,
    TouchableOpacity,
    Image
} from 'react-native';
import BaseComponent from '../base/baseComponent';
import Constants from '../base/constants';
import CommonStyles from '../base/commonStyles';
import Buttom from '../common/Buttom';

class ChangeReservation extends BaseComponent {
    constructor(props) {
        super(props);
    }

    getNavigationBarProps() {
        return {
            title: '预订车票',
            leftButtonImage: require('../images/ic_return.png'),
            hideRightButton: true,
        };
    }

    renderBody() {
        return (
            <View style={styles.container}>
                <View style={styles.Prompt}>
                    <Text style={styles.Prompt_tx}>
                        温馨提示:
                        <Text style={{ fontSize: 10, color: '#555555', }}>
                            已取票、已退票或已改签的车票无法改签
                        </Text>
                    </Text>
                </View>

                <View style={styles.boxs}>
                    <Image style={styles.Images_z}
                        source={require('../images/ic_advanceBooking.png')}
                        >
                        <View style={{ marginTop: 10, marginLeft: 30, marginRight: 30 }}>
                            <View style={[styles.box_tottom, { marginTop: 10 }]}>
                                <View style={styles.box_top_li}>
                                    <Text style={styles.box_top_tx}>2017年4月11日</Text>
                                </View>
                                <View style={{ width: (Constants.window.width - 60) / 3 - 18 - 20 }}></View>
                                <View style={styles.box_center_li}>
                                    <Text style={styles.box_top_tx}>星期二</Text>
                                </View>
                            </View>
                            <View style={styles.box_center}>
                                <View style={styles.box_center_li}>
                                    <Text style={styles.box_center_tx}>长沙南</Text>
                                </View>
                                <View style={styles.box_center_li}>
                                    <Text style={styles.box_center_tx}>G6025</Text>
                                    <View style={styles.img_position}>
                                        <Image style={{ width: 50, height: 4 }} source={require('../images/ic_trainNumber_xian.png')} />
                                    </View>
                                </View>
                                <View style={styles.box_center_li}>
                                    <Text style={styles.box_center_tx}>深圳北</Text>
                                </View>
                            </View>

                            <View style={styles.box_tottom}>
                                <View style={styles.box_center_li}>
                                    <Text style={styles.box_tottom_tx}>18:16</Text>
                                </View>
                                <View style={styles.box_center_li}></View>
                                <View style={styles.box_center_li}>
                                    <Text style={styles.box_tottom_tx}>21:36</Text>
                                </View>
                            </View>
                        </View>
                    </Image>
                </View>

                <View style={styles.pis_top}>
                    <View style={styles.pis}>
                        <View style={styles.pis_ce}>
                            <View style={[styles.pis_ce_li, { alignItems: 'flex-start', }]}>
                                <Text style={{ fontSize: 12, fontWeight: 'bold' }}>乘客姓名</Text>
                                <View style={{ position: 'absolute', top: 5, left: 55 }}>
                                    <Text style={{ fontSize: 10 }}>成人票</Text>
                                </View>
                            </View>
                            <View style={[styles.pis_ce_li, { alignItems: 'flex-start' }]}>
                                <Text style={{ fontSize: 12 }}>43001****6698</Text>
                            </View>
                        </View>
                        <View style={styles.pis_ce}>
                            <View style={[styles.pis_ce_li, { alignItems: 'flex-end' }]}>
                                <Text style={{ fontSize: 12, fontWeight: 'bold' }}>一等座</Text>
                            </View>
                            <View style={[styles.pis_ce_li, { alignItems: 'flex-end' }]}>
                                <Text style={{ fontSize: 12 }}>￥603.5</Text>
                            </View>
                        </View>
                    </View>
                </View>

                 <View style={styles.binding_buttom}>
                    <Buttom
                        //onPress={}
                        containerStyle={styles.buttom_box}
                        style={{ fontSize: 16, color: 'white' }}
                        text={'下一步'}
                        />
                </View>
            </View>
        );
    }
}

const styles = StyleSheet.create({
    container: {
        flex: 1,
        backgroundColor: CommonStyles.colors.background,
    },
    Prompt: {
        height: 33, width: Constants.window.width, backgroundColor: '#FFF7DC', justifyContent: 'center', alignItems: 'center',
    },
    Prompt_tx: {
        fontSize: 12, color: CommonStyles.colors.commonOrange
    },
    boxs: {
        marginTop: 10, borderBottomColor: CommonStyles.colors.commonOrange, borderBottomWidth: 1 / 2,
        borderTopColor: CommonStyles.colors.commonOrange, borderTopWidth: 1 / 2
    },
    Images_z: {
        width: Constants.window.width, height: 110,
    },
    box_top_tx: {
        fontSize: 13, color: '#000'
    },
    box_top_li: {
        width: (Constants.window.width - 60) / 3 + 16 + 20, alignItems: 'center', paddingLeft: 16,
    },
    box_center: {
        marginTop: 10, flexDirection: 'row', height: 25,
    },
    box_center_li: {
        width: (Constants.window.width - 60) / 3, alignItems: 'center',
    },
    box_center_tx: {
        color: '#000', fontSize: 19, fontWeight: 'bold'
    },
    box_tottom_tx: {
        color: '#000', fontSize: 12,
    },
    box_tottom: {
        flexDirection: 'row', height: 20,
    },
    pis_top: {
        marginTop: 10, backgroundColor: CommonStyles.colors.white
    },
    pis: {
        width: Constants.window.width - 30, marginLeft: 15, marginRight: 15, flexDirection: 'row',
    },
    pis_ce: {
        height: 40, width: (Constants.window.width - 30) / 2,marginTop:10,marginBottom:10
    },
    pis_ce_li: {
        height: 20, justifyContent: 'center',
    },
     binding_buttom: {
        width: Constants.window.width, marginLeft: 30, marginRight: 30,marginTop:53
    },
    //按钮样式
    buttom_box: {
        height: 47, backgroundColor: '#FF8B00', alignItems: 'center',
        justifyContent: 'center', width: Constants.window.width - 60, borderRadius: 8
    },
});

export default ChangeReservation;